<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%request.setAttribute("ctx",request.getContextPath()); %>
<html>
<head>
<link href="${ctx}/extend/css/style.css" rel="stylesheet"
	type="text/css" />
<script src="${ctx}/extend/js/jquery/jquery.js" type="text/javascript"></script>
<script src="${ctx}/extend/js/dutil/DUtil.js" type="text/javascript"></script>
<script src="${ctx}/extend/css/css.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="${ctx}/css/style.css" rel="stylesheet" type="text/css" />
<script src="${ctx}/js/common.js" type="text/javascript"></script>

<style>
table.dclass_data td, table.dclass_data th {
    border: 1px solid #9FD6FF;
    padding: 0.5em 0.3em;
    /* width: 75px; */
    width: 125px;
	word-wrap:break-word;
	overflow:hidden;
}

table td.long_width, table th.long_width {
    border: 1px solid #9FD6FF;
    padding: 0.5em 0.3em;
    width: 250px;
	word-wrap:break-word;
	overflow:hidden;
}

div.fixedLength1 {
    width: 75px;
}

div.fixedLength2 {
    width: 175px;
}

div.fixedLength3 {
    width: 250px;
}

.ctltable{ 
	table-layout:fixed
} 
.ctltable td { 
	white-space: nowrap; 
    color: #064E88;
    font-family: verdana;
    font-size: 11px;
    line-height: 18px;
    width: 275px;
} 
.ctltable th {
    border: 1px solid #9FD6FF;
    padding: 0.5em 0.3em;
    width: 275px;
} 

</style>


<title>用户管理</title>
<script type="text/javascript">
		
	function change(all){
		var item = document.getElementsByName("orderVO");
			if(all.checked){
				for(var i=0;i<item.length;i++){
					item[i].checked = true;
				}
			}
			else{
				for(var i=0;i<item.length;i++){
					item[i].checked = false;
				}
			}
	}
	function addUser(){
	    window.open('${ctx}/admin/toAddUser', "user_add",  "width=1000,height=750,top=6,left=10,scrollbars=auto");
    }
    function viewDetail(userId) {
    	window.open('${ctx}/admin/viewUser?userId='+userId, "user_view",  "width=1000,height=750,top=6,left=10,scrollbars=auto");
    }

</script>
</head>
<body class="maintable">
	<div class="dclass_container dclass_container_collapsible">
		<div class="dclass_container_header">
			<div class="dclass_container_title">查找用户</div>
		</div>
		<div class="dclass_container_content">
			<div class="search">
				<form action="" method="get">
					<table class="ctltable">
						<tr>
							<td style="display:inline" >用户名:&nbsp;&nbsp;<input type="text" class="inputsearch"
								name="userName" value="${userName}" /> &nbsp;&nbsp;&nbsp;<input
								type="image" src="${ctx}/images/btn_search.gif"
								align="absbottom" /></td>
						</tr>
					</table>
				</form>
			</div>


		</div>
	</div>
	<br style="line-height: 5px;" />


	<div class="dclass_container">
		<div class="dclass_container_header">
			<div class="dclass_container_title">用户列表</div>
		</div>
		<div class="dclass_container_content">
			<!--内容开始-->
			<div class="actions">
				<input type="button" class="btn1" name="viewPic"
					onclick="addUser();" value="新增用户" />&nbsp;
			</div>
			<table class="dclass_data" id="table1" style="display: block">
				<thead>
					<tr>
						<!-- <th align="center" width="50px">序列号</th>
						<th align="center" width="80px">用户名</th>
						<th align="center" width="100px">用户权限</th> -->
						<th align="left"><div class="fixedLength2" >序列号</div></th>
						<th align="left"><div class="fixedLength3" >用户名</div></th>
						<th align="left"><div class="fixedLength2" >用户权限</div></th>
					</tr>
				</thead>
				<tbody>
					<c:choose>
						<c:when test="${empty userList}">
							<tr>
								<td style="background-color: #ffffff" colspan="8">没有匹配用户！</td>
							</tr>
						</c:when>
						<c:otherwise>
							<s:iterator value="userList" status="status">
								<tr class="list_td" onMouseOver="this.className='list_td0'"
									onMouseOut="this.className='list_td'"
									onDblClick="viewDetail('<s:property value="userList[#status.index].userId" />')"
									title="double click to view detail">
									<td align="left"><s:property value="#status.index + 1" /></td>
									<%-- <td align="center"><s:property value="userList[#status.index].userId" /></td> --%>
									<td align="left"><s:property
											value="userList[#status.index].userName" /></td>

									<td align="left"><s:property
											value="userList[#status.index].roleName" /></td>

								</tr>
							</s:iterator>
						</c:otherwise>
					</c:choose>
				</tbody>
			</table>
			<%-- <div class="dclass_pager">
				<table width="100%">
					<tr>
						<td width="100%" height="1px" bgcolor="#336699"></td>
					</tr>
					<tr>
						<td width="100%" align="center"><c:choose>
								<c:when test="${empty userList}">共 0页  第0页   共0条记录</c:when>
								<c:otherwise>
									<c:import url="/admin/common/page3.jsp"></c:import>
								</c:otherwise>
							</c:choose></td>
					</tr>
				</table>
			</div> --%>
			
			<iframe name="execlFrame" id="execlFrame" width="0" height="0"></iframe>
			<!--内容结束-->
			
		</div>
		<div class="dclass_pager">
        	<c:choose>
        		<c:when test="${empty userList}">共 0页  第0页   共0条记录</c:when>
        		<c:otherwise><c:import url="/admin/common/page3.jsp"></c:import></c:otherwise>
        	</c:choose>
		</div>
	</div>

</body>
</html>